package com.gec.controller;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

@WebServlet("/HelloServlet")
public class HelloServlet extends HttpServlet {

    //ctrl + O可以快速按出 重写方法个的列表出来
    @Override
    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        System.out.println("我从servlet去访问jsp页面");
        System.out.println("姓名　＋　工号");
        //转发页面
        request.getRequestDispatcher("index.jsp").forward(request,response);
    }
}
